//@ts-nocheck
import React from '../../react';
import ReactDOM,{bu} from '../../react-dom';

class Counter extends React.Component {
  constructor(props) {
    super(props);
    this.state = { number: 0 };
  }
  componentDidMount(){
    this.setState({number: this.state.number + 1});
    console.log(this.state.number); // 0
    this.setState({number: this.state.number + 1});
    console.log(this.state.number); // 0
  }
  render() {
    const p = React.createElement('p', { style: { color: 'red' } }, this.state.number);
    const button = React.createElement('button', { }, '+');
    return React.createElement('div', { id: 'counter' }, p, button);
  }
}
const element = React.createElement(Counter, {});
ReactDOM.render(
  element,
  document.getElementById('root')
);
